package bob.project.object;

import org.newdawn.slick.Graphics;

import bob.project.ResourceManager;
import bob.project.slick.GameState;

public class Cloud extends MovableObject {

	public Cloud()
	{
		canCollide = false;
		setSpeed(16 + GameState.rnd.nextFloat()*32f);
	}
	
	
	@Override
	public void update(int delta)
	{
		x+=getSpeed()/1000f*delta;
		if (x > GameState.instance.getGc().getWidth() + GameState.instance.offsetX+ 32)
			x = GameState.instance.offsetX-32;
	}

	@Override
	public void draw(Graphics g)
	{
		ResourceManager.getImage(image).draw(x, y);
	}

}
